;; host/keyword.scm - (c) rohan drape, 2003-2005

;; Must provide reader syntax for colon suffixed self evaluating
;; keyword symbols.  This is derived from Eli Barzilay's Swindle.
;; Also renames mzscheme primitives that conflict with RSC usage.

(module 
 keyword mzscheme
 
 (provide (all-from-except mzscheme #%top))
 (provide (rename top~ #%top))
 
 (define-syntax (top~ stx)
   (syntax-case stx ()
     ((_ . x)
      (let ((x (syntax-object->datum #'x)))
	(and (symbol? x) (not (eq? x '||))
	     (let* ((s (symbol->string x))
		    (c (string-ref s (- (string-length s) 1))))
	       (eq? #\: c))))
      (syntax/loc stx (#%datum . x)))
     
     ((_ . x) (syntax/loc stx (#%top . x))))))
